<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
  <p v-if="ok">成功了</p>
  <p v-else>失败</p>

  <p v-show="ok">表白成功</p>
  <p v-show="!ok">表白失败</p>

  <button @click="ok=!ok">切换</button>

</div>

<script type="text/javascript" src="../../js/vue.js"></script>
<script>
  const vm = new Vue({
    el: '#app',
    data: {
      ok: false
    },

  })
</script>
</body>
</html>